package com.fqy.ticket.business.controller;

import com.fqy.ticket.business.service.RedissonLockTestService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/redission")
public class RedissionTestController {
    @Resource
    RedissonLockTestService redissonLockTestService;

    @GetMapping("/test/{test}")
    public void test(@PathVariable String test) throws InterruptedException {
        redissonLockTestService.processWithLock(test);
    }
}
